package cn.xfdzx.android.apps.shop.model;


import cn.xfdzx.android.apps.shop.bean.BaseObjectBean;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.FamilyBuyBeen;
import cn.xfdzx.android.apps.shop.bean.FoundGoodTitleBeen;
import cn.xfdzx.android.apps.shop.bean.GoodsLimitBean;
import cn.xfdzx.android.apps.shop.bean.GoodsMiaoSBean;
import cn.xfdzx.android.apps.shop.bean.HomeMarketInitDataBeen;
import cn.xfdzx.android.apps.shop.bean.HomeMarketSelectBeen;
import cn.xfdzx.android.apps.shop.bean.LoginBean;
import cn.xfdzx.android.apps.shop.bean.SelfOwnedShopBeen;
import cn.xfdzx.android.apps.shop.contract.HomeMarketContract;
import cn.xfdzx.android.apps.shop.contract.LoginContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class HomeMarketModel implements HomeMarketContract.Model {


    @Override
    public Flowable<FoundGoodTitleBeen> initTitle(String pid, String index_status) {
        return RetrofitClient.getInstance().getApi().foundGoodTitle(pid,index_status);
    }

    @Override
    public Flowable<FamilyBuyBeen> familyBuy(String sales_model) {
        return RetrofitClient.getInstance().getApi().familyBuy(sales_model);
    }

    @Override
    public Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum) {
        return  RetrofitClient.getInstance().getApi().confirmGood(is_new,uniqueId,productId,cartNum);

    }

    @Override
    public Flowable<BaseObjectBean<HomeMarketInitDataBeen>> initData() {
        return RetrofitClient.getInstance().getApi().homeMarketInitData();
    }


    @Override
    public Flowable<HomeMarketSelectBeen> initSelectData(String pages, String limit) {
        return RetrofitClient.getInstance().getApi().homeMarketInitSelectData(pages,limit);
    }

    @Override
    public Flowable<SelfOwnedShopBeen> selfOwnedShop(String limit) {
        return RetrofitClient.getInstance().getApi().selfOwnedShop( limit);
    }




    @Override
    public Flowable<GoodsLimitBean> getGoodsLimitList(String limit, int page) {
        return RetrofitClient.getInstance().getApi().getGoodsLimit(page,limit);
    }

    @Override
    public Flowable<GoodsMiaoSBean> getGoodsMiaoShaList(String limit, int page) {
        return RetrofitClient.getInstance().getApi().getGoodsMiaoShaList(page,limit);
    }
}
